package com.scoresystem.web.ui.view;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.scoresystem.utils.JsonUtil;

import net.sf.json.JSONObject;

public class ShowTeaUpdateScoreView implements IShowable {

	@Override
	public void showView(JSONObject json, HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		response.setCharacterEncoding("utf-8");
		response.setHeader("contentType", "text/html; charset=utf-8");
		if(JsonUtil.getState(json).equals("success")){
			request.getRequestDispatcher("/TeacherMain.jsp").forward(request, response);
		}
		else
			request.getRequestDispatcher("/insertScore.jsp").forward(request, response);

	}

}
